home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2510.ZIP / TRSOURCE.EXE / TR_GTARA.PRG < prev    next >
Text File  |  1990-10-22  |  848b  |  33 lines

  1. *********
  2. * Function : GETAREA
  3. * By : Tom Rettig
  4. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  5. *********
  6.  
  7.  
  8. FUNCTION GETAREA
  9. * Syntax: GETAREA( <getarea>, <function> )
  10. * Return: Value of <function> in <getarea>
  11. *         <getarea> can be <expC> alias name or letter,
  12. *                        or <expN> work-area number.
  13. *         <function> is <expC> and must contain the parentheses, e.g.: "EOF()".
  14. * Note..: This is useful only when <function> is work-area specific
  15. *         such as EOF(), RECNO(), HEADER(), LASTREC(), FOUND(), etc.
  16. PARAMETERS getarea, myfunc
  17. MEMVAR cur_select, result
  18. PRIVATE cur_select, result
  19.  
  20. cur_select = LTRIM(STR(SELECT()))
  21. IF TYPE('getarea') = "N"
  22.    getarea = LTRIM(STR(getarea))
  23. ENDIF
  24.  
  25. SELECT &getarea
  26. result = &myfunc
  27. SELECT &cur_select
  28.  
  29. RETURN result
  30. * eofunc
  31.  
  32.  
  33.